package com.dstz.demo.core.manager.impl;

import com.dstz.demo.core.dao.OrderbusDao;
import com.dstz.demo.core.manager.OrderbusService;
import com.dstz.demo.core.model.Orderbus;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
@Service
public class OrderbusServiceImpl implements OrderbusService {


    @Resource
    private OrderbusDao orderbusDao;

    @Override
    public String insert(Orderbus orderbus) {
        String excetion="成功插入";
       int row= orderbusDao.insert(orderbus);
        if(row!=1) {
            excetion="失败插入";
        }
        return excetion ;
    }


    public Orderbus getByIdOrderbus(Integer id) {
        return orderbusDao.byIdOrderbus(id);
    }
}
